-- GENERATED SPELL FOR [Uncontrolled Voidwalker] --


function spell0_16975(pUnit, Event) --@Coalesce,Self--
pUnit:FullCastSpellOnTarget(34302,pUnit)
pUnit:RegisterEvent('Sorts_16975', 1500, 1)
end

function spell1_16975(pUnit, Event) --@De-Materialize,Self--
pUnit:FullCastSpellOnTarget(34842,pUnit)
pUnit:RegisterEvent('Sorts_16975', 1500, 1)
end

function spell2_16975(pUnit, Event) --@Shadowstrike,n/a--
pUnit:FullCastSpellOnTarget(33914,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16975', 584, 1)
end

function spell3_16975(pUnit, Event) --@Void Drain,Self--
pUnit:FullCastSpellOnTarget(33916,pUnit)
pUnit:RegisterEvent('Sorts_16975', 13000, 1)
end

function Sorts_16975(pUnit, Event)
local choix_sorts_16975 = math.random(0, 3)
if choix_sorts_16975 == 0 then
pUnit:RegisterEvent('spell0_16975', 1, 1)
end
if choix_sorts_16975 == 1 then
pUnit:RegisterEvent('spell1_16975', 1, 1)
end
if choix_sorts_16975 == 2 then
pUnit:RegisterEvent('spell2_16975', 1, 1)
end
if choix_sorts_16975 == 3 then
pUnit:RegisterEvent('spell3_16975', 1, 1)
end
end

function mob16975_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16975', math.random(1500, 3000), 1)
end

function mob16975_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16975_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16975_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16975, 1, 'mob16975_Action')
RegisterUnitEvent(16975, 2, 'mob16975_Leave')
RegisterUnitEvent(16975, 3, 'mob16975_Kill')
RegisterUnitEvent(16975, 4, 'mob16975_Die')
